CFLAGS = /W4

build: server.exe client.exe
server.exe: src/server.obj src/sharedMemory.obj src/semaphore.obj src/messageQueue.obj src/BinaryTree.obj
	link $**
client.exe: src/client.obj src/sharedMemory.obj src/semaphore.obj src/messageQueue.obj src/BinaryTree.obj
	link $**
src/sharedMemory.obj: src/sharedMemory.cpp
	cl $(CFLAGS) /c /Fo$@ $**
src/semaphore.obj: src/semaphore.cpp
	cl $(CFLAGS) /c /Fo$@ $**
src/messageQueue.obj: src/messageQueue.cpp
	cl $(CFLAGS) /c /Fo$@ $**
src/BinaryTree.obj:src/BinaryTree.cpp
	cl $(CFLAGS) /c /Fo$@ $**
src/client.obj:src/client.cpp
	cl $(CFLAGS) /c /Fo$@ $**
src/server.obj:src/server.cpp
	cl $(CFLAGS) /c /Fo$@ $**

.PHONY:clean
clean:
	del /q *.exe 
	cd src
	del *.obj